import {createRouter , createWebHashHistory} from 'vue-router'

const constantRoutes = [
    {
        path:'/:pathMatch(.*)*',
        name:'notFound',
        component:()=> import('@/views/404/index.vue'),
    },
    {
        path:'/main',
        name:'main',
        component:()=> import('@/views/main/index.vue'),
        // children: [
        //     {
        //         path:'/main/chat',
        //         name:'chat',
        //         component:()=> import('@/views/main/chat/index.vue'),
        //         meta:{
        //             index:0,
        //             keepAlive:true
        //         }
        //     },{
        //         path:'/main/user',
        //         name:'user',
        //         component:()=> import('@/views/main/user/index.vue'),
        //         meta:{
        //             index:1,
        //             keepAlive:true
        //         }
        //     },
        // ]
    },
]

let router = createRouter({
    history: createWebHashHistory(),
    routes: constantRoutes,
})

export default router
